/**
 * 
 */
package com.jw.server.model;

import javax.persistence.Entity;

import cn.ydx.protobuf.OTIpcDef;

/**
 * @author Jason Biao
 *
 *         网约车平台公司基本信息
 */
@Entity
public class BaseInfoCompany extends BaseEntity {


	/**
	 * 
	 */
	private static final long serialVersionUID = 8310485690324048429L;

	private String companyName;

	private String identifier;

	private int address;

	private String businessScope;

	private String contactAddress;

	private String economicType;

	private String regCapital;

	private String legalName;

	private String legalId;

	private String legalPhone;
	
	private String legalPhoto;

	private int state;

	public String getLegalPhoto() {
		return legalPhoto;
	}

	public void setLegalPhoto(String legalPhoto) {
		this.legalPhoto = legalPhoto;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getIdentifier() {
		return identifier;
	}

	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}

	public int getAddress() {
		return address;
	}

	public void setAddress(int address) {
		this.address = address;
	}

	public String getBusinessScope() {
		return businessScope;
	}

	public void setBusinessScope(String businessScope) {
		this.businessScope = businessScope;
	}

	public String getContactAddress() {
		return contactAddress;
	}

	public void setContactAddress(String contactAddress) {
		this.contactAddress = contactAddress;
	}

	public String getEconomicType() {
		return economicType;
	}

	public void setEconomicType(String economicType) {
		this.economicType = economicType;
	}

	public String getRegCapital() {
		return regCapital;
	}

	public void setRegCapital(String regCapital) {
		this.regCapital = regCapital;
	}

	public String getLegalName() {
		return legalName;
	}

	public void setLegalName(String legalName) {
		this.legalName = legalName;
	}

	public String getLegalId() {
		return legalId;
	}

	public void setLegalId(String legalId) {
		this.legalId = legalId;
	}

	public String getLegalPhone() {
		return legalPhone;
	}

	public void setLegalPhone(String legalPhone) {
		this.legalPhone = legalPhone;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	  public static OTIpcDef.BaseInfoCompany convert(BaseInfoCompany data){
	        OTIpcDef.BaseInfoCompany item = OTIpcDef.BaseInfoCompany.newBuilder()
	                .setCompanyId(data.getCompanyId())
	                .setCompanyName(data.getCompanyName())
	                .setIdentifier(data.getIdentifier())
	                .setAddress(data.getAddress())
	                .setBusinessScope(data.getBusinessScope())
	                .setContactAddress(data.getContactAddress())
	                .setEconomicType(data.getEconomicType())
	                .setRegCapital(data.getRegCapital())
	                .setLegalName(data.getLegalName())
	                .setLegalID(data.getLegalId())
	                .setLegalPhone(data.getLegalPhone())
	                .setState(data.getState())
	                .setFlag(data.getFlag())
	                .setUpdateTime(Long.valueOf(data.getUpdateTime()))
	                .setLegalPhoto(data.getLegalPhoto())
	                .build();

	        return item;
	    }

	  
	  public static BaseInfoCompany convertPojo(OTIpcDef.BaseInfoCompany data){
		  BaseInfoCompany bic=new BaseInfoCompany();
		  bic.setAddress(data.getAddress());
		  bic.setBusinessScope(data.getBusinessScope());
		  bic.setCompanyId(data.getCompanyId());
		  bic.setCompanyName(data.getCompanyName());
		  bic.setContactAddress(data.getContactAddress());
		  bic.setEconomicType(data.getEconomicType());
		  bic.setFlag(data.getFlag());
		  bic.setIdentifier(data.getIdentifier());
		  bic.setLegalId(data.getLegalID());
		  bic.setLegalName(data.getLegalName());
		  bic.setLegalPhone(data.getLegalPhone());
		  bic.setRegCapital(data.getRegCapital());
		  bic.setState(data.getState());
		  bic.setUpdateTime(data.getUpdateTime());
		  bic.setLegalPhoto(data.getLegalPhoto());
		  return bic;
	  }

}
